package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PopulationQianyiMapper;
import com.ruoyi.system.domain.PopulationQianyi;
import com.ruoyi.system.service.IPopulationQianyiService;
import com.ruoyi.common.core.text.Convert;

/**
 * 户口迁移Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-10-15
 */
@Service
public class PopulationQianyiServiceImpl implements IPopulationQianyiService 
{
    @Autowired
    private PopulationQianyiMapper populationQianyiMapper;

    /**
     * 查询户口迁移
     * 
     * @param id 户口迁移主键
     * @return 户口迁移
     */
    @Override
    public PopulationQianyi selectPopulationQianyiById(Long id)
    {
        return populationQianyiMapper.selectPopulationQianyiById(id);
    }

    /**
     * 查询户口迁移列表
     * 
     * @param populationQianyi 户口迁移
     * @return 户口迁移
     */
    @Override
    public List<PopulationQianyi> selectPopulationQianyiList(PopulationQianyi populationQianyi)
    {
        return populationQianyiMapper.selectPopulationQianyiList(populationQianyi);
    }

    /**
     * 新增户口迁移
     * 
     * @param populationQianyi 户口迁移
     * @return 结果
     */
    @Override
    public int insertPopulationQianyi(PopulationQianyi populationQianyi)
    {
        populationQianyi.setCreateTime(DateUtils.getNowDate());
        return populationQianyiMapper.insertPopulationQianyi(populationQianyi);
    }

    /**
     * 修改户口迁移
     * 
     * @param populationQianyi 户口迁移
     * @return 结果
     */
    @Override
    public int updatePopulationQianyi(PopulationQianyi populationQianyi)
    {
        return populationQianyiMapper.updatePopulationQianyi(populationQianyi);
    }

    /**
     * 批量删除户口迁移
     * 
     * @param ids 需要删除的户口迁移主键
     * @return 结果
     */
    @Override
    public int deletePopulationQianyiByIds(String ids)
    {
        return populationQianyiMapper.deletePopulationQianyiByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除户口迁移信息
     * 
     * @param id 户口迁移主键
     * @return 结果
     */
    @Override
    public int deletePopulationQianyiById(Long id)
    {
        return populationQianyiMapper.deletePopulationQianyiById(id);
    }
}
